﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMasterPage.Master" AutoEventWireup="true"
    CodeBehind="StudentSetup.aspx.cs" Inherits="OpenSIS.Student.StudentSetup" Culture="auto"
    meta:resourcekey="PageResource1" UICulture="auto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" language="javascript">

    
        //----------------------------------------------------------------------------------------------------
        function ddlFieldTypeOnSelectedIndexChange(panel, lblmsg, lblmsgCtrl, txtListitems, btnSaveControlListItems, TableListItem) {
            var selectedvalue = document.getElementById('<%= ddlFieldType.ClientID %>').options[document.getElementById('<%= ddlFieldType.ClientID %>').selectedIndex].value;
            if (selectedvalue == 2) {
                document.getElementById(panel).style.display = 'block';
                document.getElementById(TableListItem).style.display = 'block';
                document.getElementById(lblmsg).style.display = 'block';
                document.getElementById(lblmsgCtrl).style.display = 'block';
                document.getElementById(lblmsgCtrl).innerText = "check box";
                document.getElementById(txtListitems).style.display = 'block';
                document.getElementById(btnSaveControlListItems).style.display = 'block';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            else if (selectedvalue == 3) {
                document.getElementById(panel).style.display = 'block';
                document.getElementById(TableListItem).style.display = 'block';
                document.getElementById(lblmsg).style.display = 'block';
                document.getElementById(lblmsgCtrl).style.display = 'block';
                document.getElementById(lblmsgCtrl).innerText = "radio button";
                document.getElementById(txtListitems).style.display = 'block';
                document.getElementById(btnSaveControlListItems).style.display = 'block';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            else if (selectedvalue == 4) {
                document.getElementById(panel).style.display = 'block';
                document.getElementById(TableListItem).style.display = 'block';
                document.getElementById(lblmsg).style.display = 'block';
                document.getElementById(lblmsgCtrl).style.display = 'block';
                document.getElementById(lblmsgCtrl).innerText = "dropdown list";
                document.getElementById(txtListitems).style.display = 'block';
                document.getElementById(btnSaveControlListItems).style.display = 'block';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            else if (selectedvalue == 0) {
                document.getElementById(TableListItem).style.display = 'none';
                document.getElementById(lblmsg).style.display = 'none';
                document.getElementById(lblmsgCtrl).style.display = 'none';
                document.getElementById(txtListitems).style.display = 'none';
                document.getElementById(btnSaveControlListItems).style.display = 'none';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            else if (selectedvalue == 1) {
                document.getElementById(TableListItem).style.display = 'none';
                document.getElementById(lblmsg).style.display = 'none';
                document.getElementById(lblmsgCtrl).style.display = 'none';
                document.getElementById(txtListitems).style.display = 'none';
                document.getElementById(btnSaveControlListItems).style.display = 'none';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            else if (selectedvalue == 5) {
                document.getElementById(TableListItem).style.display = 'none';
                document.getElementById(lblmsg).style.display = 'none';
                document.getElementById(lblmsgCtrl).style.display = 'none';
                document.getElementById(txtListitems).style.display = 'none';
                document.getElementById(btnSaveControlListItems).style.display = 'none';
                var grid = document.getElementById('<%= gvControlListItem.ClientID %>');
                if (grid != null) {
                    grid.style.display = 'none';
                }
            }
            false;
        }  

    </script>
    <div class="addstudent_container">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td align="center">
              <strong>
                        <asp:LinkButton ID="lnkAddCat" CausesValidation="false" Font-Size="Small" ForeColor="Red" runat="server" Text="Add New Category :" OnClick="lnkAddCat_Click"></asp:LinkButton></strong>
                </td>
                <td align="right">
                    <asp:Panel ID="panel1" runat="server" meta:resourcekey="panel1Resource1" Visible="false" BorderColor="AliceBlue">
                        <table id="TableAddNew" border="0" cellspacing="0" cellpadding="0" width="100%">
                            <tr>
                                <td class="darkblue" valign="top" align="center">
                                    <asp:Literal ID="Literal2" runat="server" Text="Category Name" meta:resourcekey="Literal2Resource1"></asp:Literal>
                                </td>
                                <td valign="top" class="colon">
                                    :
                                </td>
                                <td class="width40 blue" valign="top" align="left">
                                    <asp:TextBox CssClass="textbox1" ID="txtCategoryName" runat="server" meta:resourcekey="txtCategoryNameResource1"></asp:TextBox>
                                    <div class="clear_m">
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" align="center">
                                    <asp:Button ID="btnCategorySave" CausesValidation="False" runat="server" OnClick="btnCategorySave_Click"
                                        Text="Save" meta:resourcekey="btnCategorySaveResource1" />
                                    <asp:Button ID="btnCategoryCancel" runat="server" OnClick="btnCategoryCancel_Click" CausesValidation="false" Text="Cancel" meta:resourcekey="btnCategoryCancelResource1" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td class="viewformtab_content" align="right">
                    <div style="z-index: 999; width: 210px;" align="right">
                        <asp:TreeView ID="TreeView1" ExpandDepth="0" runat="server" LineImagesFolder="~/TreeLineImages"
                            OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" meta:resourcekey="TreeView1Resource1">
                            <RootNodeStyle CssClass="" />
                            <LeafNodeStyle CssClass="viewformtab_leaf" />
                            <ParentNodeStyle CssClass="" />
                            <HoverNodeStyle CssClass="viewformtab" />
                            <SelectedNodeStyle CssClass="viewformtab_select" />
                            <NodeStyle CssClass="" />
                        </asp:TreeView>
                    </div>
                    <asp:HiddenField ID="hdnCatId" runat="server" />
                </td>
                <td style="padding: 10px;" valign="top" class="addstudent_content" rowspan="2">
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="left" valign="top">
                                <div align="right">
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <table width="100%">
                                                    <tr>
                                                        <td align="right">
                                                            <asp:ImageButton ID="ibtnEditCategory" ImageUrl="~/App_Themes/main/images/edit.png"
                                                                runat="server" CausesValidation="False" OnClick="ibtnEditCategory_Click" meta:resourcekey="ibtnEditCategoryResource1" />
                                                        </td>
                                                        <td align="right">
                                                            <img src="../App_Themes/main/images/icon_separator.png" />
                                                        </td>
                                                        <td align="right">
                                                            <asp:ImageButton ID="ibtnDeleteCategory" ImageUrl="~/App_Themes/main/images/delete.png"
                                                                runat="server" CausesValidation="False" meta:resourcekey="ibtnDeleteCategoryResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div class="bevel_horline" style="width: 100%">
                                                            </div>
                                                            <div class="clear_small">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" class="darkblue">
                                                            Category Name :
                                                        </td>
                                                        <td align="left" class="school_header_txt">
                                                            <asp:Label ID="lblHeader" CssClass="school_header_txt" runat="server" meta:resourcekey="lblHeaderResource1"></asp:Label>
                                                            <asp:HiddenField ID="hdnCatOrder" runat="server" />
                                                            <asp:HiddenField ID="hdnDefCat" runat="server" />
                                                        </td>
                                                         <td align="left" class="darkblue">
                                                            Sort Order :
                                                        </td>
                                                        <td align="left" class="school_header_txt">
                                                            <asp:Label ID="lblShortOrder" CssClass="school_header_txt" runat="server"></asp:Label>                                                          
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <table border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td align="right">
                                                            <asp:ImageButton ID="ibtnAdd" CausesValidation="False" runat="server" ImageUrl="~/App_Themes/main/images/add.png"
                                                                meta:resourcekey="ibtnAddResource1" onclick="ibtnAdd_Click" />
                                                        </td>
                                                        <td align="right">
                                                        <asp:Image ID="imgSeperator1" ImageUrl="~/App_Themes/main/images/icon_separator.png" runat="server" />
                                                            
                                                        </td>
                                                        <td align="right">
                                                            <asp:ImageButton ID="imgbtnEdit" ImageUrl="~/App_Themes/main/images/edit.png" runat="server"
                                                                CausesValidation="False" OnClick="imgbtnEdit_Click" meta:resourcekey="imgbtnEditResource1" />
                                                        </td>
                                                        <td align="right">
                                                            <img src="../App_Themes/main/images/icon_separator.png" />
                                                        </td>
                                                        <td align="right">
                                                            <asp:ImageButton ID="imgbtnDelete" ImageUrl="~/App_Themes/main/images/delete.png"
                                                                runat="server" CausesValidation="False" OnClick="imgbtnDelete_Click" meta:resourcekey="imgbtnDeleteResource1" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="bevel_horline">
                                </div>
                                <div class="clear_small">
                                </div>
                                <table id="dTable" runat="server" border="0" cellpadding="0" cellspacing="0">
                                </table>
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td class="darkblue" id="tdFldNam" runat="server">
                                            <asp:Literal ID="Literal12" runat="server" Text="Field Name" meta:resourcekey="Literal12Resource1"></asp:Literal>
                                        </td>
                                        <td class="student_field2 darkblue">
                                            <asp:Literal ID="Literal5" runat="server" Text="Field Type" meta:resourcekey="Literal5Resource1"></asp:Literal>
                                        </td>
                                         
                                        <td class="student_field2 darkblue">
                                            <asp:Literal ID="Literal6" runat="server" Text="Field Attribute" meta:resourcekey="Literal6Resource1"></asp:Literal>
                                        </td>
                                    </tr>
                                </table>
                                <div class="clear_small">
                                </div>
                                <asp:GridView ID="gvCategoryFields" runat="server" CellPadding="0" AutoGenerateColumns="False"
                                    BorderStyle="None" BorderWidth="0px" Width="100%" ShowHeader="False" OnRowDataBound="gvCategoryFields_RowDataBound"
                                    EnableModelValidation="True" meta:resourcekey="gvCategoryFieldsResource1">
                                    <Columns>
                                        <asp:TemplateField meta:resourcekey="TemplateFieldResource13">
                                            <ItemTemplate>
                                                <table width="100%" cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td class="student_header" style="padding-left: 8px">
                                                            <asp:CheckBox ID="chkrowCatFld" runat="server" meta:resourcekey="chkrowCatFldResource1" />
                                                            <asp:Label ID="lblFieldNameCatFld" runat="server" CssClass="blue" Text='<%# Eval("FieldName") %>'
                                                                meta:resourcekey="lblFieldNameCatFldResource1"></asp:Label>
                                                            <asp:HiddenField ID="hdnFieldIdCatFld" runat="server" Value='<%# Eval("FieldId") %>' />
                                                            &nbsp;
                                                        </td>
                                                        <td class="student_field2 student_header" >
                                                            <asp:Label ID="lblFieldDisplaytypeCatFld" runat="server" Text='<%# Eval("Default_Custom_Name") %>' ></asp:Label>&nbsp;
                                                        </td>
                                                        <td class="student_field2 student_header">
                                                            <asp:Label ID="lblFieldTypeCatFld" runat="server" meta:resourcekey="lblFieldTypeCatFldResource1"></asp:Label>
                                                            <asp:HiddenField ID="hdnFieldTypeCatFld" runat="server" Value='<%# Eval("FieldType") %>' />
                                                            &nbsp;
                                                        </td>
                                                        <asp:HiddenField ID="hdnStatusCatFld" runat="server" Value='<%# Eval("Status") %>' />
                                                        <asp:HiddenField ID="hdnDefaultOrCustomCatFld" runat="server" Value='<%# Eval("Default_Custom") %>' />
                                                        <asp:HiddenField ID="hdnIsMandatoryCatFld" runat="server" Value='<%# Eval("IsMandatory") %>' />
                                                        <asp:HiddenField ID="hdnFieldViewCatFld" runat="server" Value='<%# Eval("Field_View") %>' />
                                                    </tr>
                                                    <tr>
                                                        <td colspan="7">
                                                            <asp:GridView BorderStyle="None" BorderWidth="0px" ID="gvAddressFields" runat="server"
                                                                AutoGenerateColumns="False" Width="100%" ShowHeader="False" CellPadding="0" OnRowDataBound="gvAddressFields_RowDataBound"
                                                                EnableModelValidation="True" meta:resourcekey="gvAddressFieldsResource1">
                                                                <Columns>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border" style="padding-left: 10px;">
                                                                                <asp:CheckBox ID="chkrowAddFld" runat="server" meta:resourcekey="chkrowAddFldResource1" />
                                                                                <asp:Label ID="lblFieldNameAddFld" runat="server" Text='<%# Eval("FieldName") %>'
                                                                                    meta:resourcekey="lblFieldNameAddFldResource1"></asp:Label>
                                                                                <asp:HiddenField ID="hdnFieldIdAddFld" runat="server" Value='<%# Eval("FieldId") %>' />
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField Visible="true" meta:resourcekey="TemplateFieldResource2">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:Label ID="lblFieldDisplaytypeAddFld" Text='<%# Eval("Default_Custom_Name") %>' runat="server"></asp:Label>
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field2" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource3">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:Label ID="lblFieldTypeAddFld" runat="server" meta:resourcekey="lblFieldTypeAddFldResource1"></asp:Label>
                                                                                <asp:HiddenField ID="hdnFieldTypeAddFld" runat="server" Value='<%# Eval("FieldType") %>' />
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field2" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource4">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:HiddenField ID="hdnStatusAddFld" runat="server" Value='<%# Eval("Status") %>' />
                                                                                <asp:HiddenField ID="hdnDefaultOrCustomAddFld" runat="server" Value='<%# Eval("Default_Custom") %>' />
                                                                                <asp:HiddenField ID="hdnIsMandatoryAddFld" runat="server" Value='<%# Eval("IsMandatory") %>' />
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource5">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:HiddenField ID="hdnFieldViewAddFld" runat="server" Value='<%# Eval("Field_View") %>' />
                                                                                &nbsp;</div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource6">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <HeaderStyle HorizontalAlign="Center" />
                                                            </asp:GridView>
                                                            <asp:GridView BorderStyle="None" BorderWidth="0px" ID="gvSpecialEd" runat="server"
                                                                AutoGenerateColumns="False" Width="100%" ShowHeader="False" CellPadding="0" OnRowDataBound="gvSpecialEd_RowDataBound"
                                                                EnableModelValidation="True" meta:resourcekey="gvSpecialEdResource1">
                                                                <Columns>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource7">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border" style="padding-left: 10px;">
                                                                                <asp:CheckBox ID="chkRowSplId" runat="server" meta:resourcekey="chkRowSplIdResource1" />
                                                                                <asp:Label ID="lblFieldNameSplId" runat="server" Text='<%# Eval("FieldName") %>'
                                                                                    meta:resourcekey="lblFieldNameSplIdResource1"></asp:Label>
                                                                                <asp:HiddenField ID="hdnFieldIdSplId" runat="server" Value='<%# Eval("FieldId") %>' />
                                                                                <asp:HiddenField ID="hdnDeffldidSplId" runat="server" Value='<%# Eval("Def_Field_Id") %>' />
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField Visible="true" meta:resourcekey="TemplateFieldResource8">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:Label ID="lblFieldDisplaytypeSplId" Text='<%# Eval("Field_Created") %>' runat="server" ></asp:Label>
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field2" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource9">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:Label ID="lblFieldTypeSplId" runat="server" meta:resourcekey="lblFieldTypeSplIdResource1"></asp:Label>
                                                                                <asp:HiddenField ID="hdnFieldTypeSplId" runat="server" Value='<%# Eval("FieldType") %>' />
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field2" HorizontalAlign="Left" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource10">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:HiddenField ID="hdnStatusSplId" runat="server" Value='<%# Eval("Status") %>' />
                                                                                <asp:HiddenField ID="hdnIsMandatorySplId" runat="server" Value='<%# Eval("IsMandatory") %>' />
                                                                                &nbsp;
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource11">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                                <asp:HiddenField ID="hdnFieldViewSplId" runat="server" Value='<%# Eval("Field_View") %>' />
                                                                                &nbsp;</div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource12">
                                                                        <ItemTemplate>
                                                                            <div class="student_grid_border">
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle BorderWidth="0px" CssClass="student_field5" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <HeaderStyle HorizontalAlign="Center" />
                                                            </asp:GridView>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            <ControlStyle BorderWidth="0px" />
                                            <HeaderStyle BorderWidth="0px" HorizontalAlign="Left" />
                                            <ItemStyle BorderStyle="None" BorderWidth="0px" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="viewformtab_bot">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <div class="clear_small">
    </div>
    <%--###############Add Panel new fields #############################--%>
    <asp:Panel ID="panel_Popup" runat="server" Style="display: none" CssClass="ModalPopup"
        Width="600px" meta:resourcekey="panel_PopupResource1">
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="modal_header_left bottom_black">
                    &nbsp;
                </td>
                <td class="modal_header_bg" valign="top">
                    <div class="modal_header">
                        <asp:Literal ID="ltrlAddcat" runat="server" Text="Add New Category/Attribute" meta:resourcekey="ltrlAddcatResource1"></asp:Literal>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="modal_rtgrey">
                    &nbsp;
                </td>
                <td class="modal_bg">
                    <div style="overflow: auto; overflow-x: hidden; width: 540px; max-height: 380px;">
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                            <tr>
                                <td class="school_lcontent" valign="top">
                                    <asp:Literal ID="Literal1" runat="server" Text="Category" meta:resourcekey="Literal1Resource1"></asp:Literal>
                                </td>
                                <td valign="top" class="colon">
                                    :
                                </td>
                                <td class="width40 blue" valign="top">
                                    <%--<asp:DropDownList ID="ddlCategory" runat="server" meta:resourcekey="ddlCategoryResource1">
                                    </asp:DropDownList>--%>

                                    <asp:Label ID="lblAddCategoryName" runat="server"></asp:Label><%--

                                    <br />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlCategory"
                                        ErrorMessage="<div class='alert' align='left'>Category is required</div>" Display="Dynamic"
                                        InitialValue="0" meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>--%>
                                    <div class="clear_m">
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                 <asp:Literal ID="LitHeaderName" runat="server" Text="Header Name" Visible="false"></asp:Literal>
                                </td>
                                <td>
                                <asp:Label ID="lblcolon" runat="server" Text=":" Visible="false"></asp:Label>
                                </td>
                                <td>
                                <asp:Label ID="lblHeaderText" runat="server" Visible="false"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">
                                    <asp:Literal ID="Literal3" runat="server" Text="Field Name" meta:resourcekey="Literal3Resource1"></asp:Literal>
                                </td>
                                <td valign="top">
                                    :
                                </td>
                                <td class="blue" valign="top">
                                    <asp:TextBox CssClass="textbox1" ID="txtFieldName" runat="server" meta:resourcekey="txtFieldNameResource1"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvFieldName" runat="server" ControlToValidate="txtFieldName"
                                        ErrorMessage="<div class='alert' align='left'>Field Name is required</div>" Display="Dynamic"
                                        ValidationGroup="main" meta:resourcekey="rfvFieldNameResource1"></asp:RequiredFieldValidator>
                                    <div class="clear_m">
                                    </div>
                                </td>
                            </tr>
                            
                            
                             <tr>
                                <td valign="top">
                                    <asp:Literal ID="Literal10" runat="server" Text="Required"></asp:Literal>
                                </td>
                                <td valign="top">
                                    :
                                </td>
                                <td class="blue" valign="top">
                                   <asp:RadioButtonList ID="rbtnReq" runat="server" RepeatDirection="Horizontal">
                                   <asp:ListItem Value="M">Yes</asp:ListItem>
                                   <asp:ListItem Value="N" Selected="True">No</asp:ListItem>
                                   </asp:RadioButtonList> 
                                   
                                    <div class="clear_m">
                                    </div>
                                </td>
                            </tr>
                            
                            
                            <tr>
                                <td valign="top">
                                    <asp:Literal ID="Literal4" runat="server" Text="Field Type" meta:resourcekey="Literal4Resource1"></asp:Literal>
                                </td>
                                <td valign="top">
                                    :
                                </td>
                                <td class="blue" valign="top">
                                    <asp:DropDownList ID="ddlFieldType" runat="server" meta:resourcekey="ddlFieldTypeResource1">
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvFieldType" runat="server" ControlToValidate="ddlFieldType"
                                        ErrorMessage="<div class='alert' align='left'>Field Type is required</div>" Display="Dynamic"
                                        InitialValue="0" ValidationGroup="main" meta:resourcekey="rfvFieldTypeResource1"></asp:RequiredFieldValidator>
                                    <div class="clear_m">
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" valign="top">
                                    <asp:Panel ID="panellist" runat="server" meta:resourcekey="panellistResource1">
                                        <table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TableListItem"
                                            style="display: none">
                                            <tr runat="server">
                                                <td valign="top" style="width: 38%" runat="server">
                                                    <asp:Label ID="lblmsg" class="normal_txt" runat="server" Text="Enter item for " Style="display: none"></asp:Label><asp:Label
                                                        ID="lblmsgCtrl" class="normal_txt" runat="server"></asp:Label>
                                                </td>
                                                <td class="colon" valign="top" runat="server">
                                                    :
                                                </td>
                                                <td align="left" valign="top" style="padding-left: 5px;" runat="server">
                                                    <table cellpadding="0" cellspacing="0" width="60%" id="TableFieldValues">
                                                        <tr>
                                                            <td valign="top">
                                                                <asp:TextBox ID="txtListitems" runat="server" Style="display: none"></asp:TextBox><asp:RequiredFieldValidator
                                                                    ID="rfvtxtDropdownListitems" runat="server" ControlToValidate="txtListitems"
                                                                    ErrorMessage="<div class='alert' align='left'>List Item is required</div>" ValidationGroup="controldata1"></asp:RequiredFieldValidator>
                                                            </td>
                                                            <td valign="top" style="padding-left: 3px;">
                                                                <asp:Button ID="btnSaveControlListItems" runat="server" OnClick="btnSaveControlListItems_Click"
                                                                    Style="display: none" Text="Add List Item" ValidationGroup="controldata1" CssClass="modal_innerbtn" />
                                                                <div class="clear_m">
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:GridView ID="gvControlListItem" runat="server" AutoGenerateColumns="False" CellPadding="0"
                                        BorderColor="ControlLightLight" Width="100%" OnRowCommand="gvControlListItem_RowCommand"
                                        OnRowDeleting="gvControlListItem_RowDeleting" BorderWidth="0px" EnableModelValidation="True"
                                        meta:resourcekey="gvControlListItemResource1">
                                        <AlternatingRowStyle CssClass="grid_altrow" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="List Item" meta:resourcekey="TemplateFieldResource14">
                                                <ItemTemplate>
                                                    <asp:HiddenField ID="hdnfieldTypeCtlListItem" runat="server" Value='<%# Eval("FieldType") %>' />
                                                    <asp:Label ID="lblddllistitem" runat="server" BorderColor="White" CssClass="normal_txt"
                                                        meta:resourcekey="lblddllistitemResource1" Text='<%# Eval("ListItem") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="modal_gridheader" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Delete" meta:resourcekey="TemplateFieldResource15">
                                                <ItemTemplate>
                                                    <asp:Button ID="btndelete" runat="server" BorderColor="White" CausesValidation="False"
                                                        CommandName="Delete" CssClass="modal_innerbtn" meta:resourcekey="btndeleteResource1"
                                                        Text="Delete" />
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="modal_gridheader" HorizontalAlign="Left" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <HeaderStyle BorderWidth="0px" HorizontalAlign="Left" />
                                        <RowStyle BorderColor="White" CssClass="grid_row" />
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:HiddenField ID="hdnExtraFldId" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="separator_hor">
                    </div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="right">
                                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="modalbtn_active" OnClick="btnSave_Click"
                                    ValidationGroup="main" meta:resourcekey="btnSaveResource1" />
                                <asp:Button ID="btnCancel" CausesValidation="False" runat="server" Text="Cancel"
                                    CssClass="modalbtn_active" OnClick="btnCancel_Click" meta:resourcekey="btnCancelResource1" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="Inactive"
        TargetControlID="ibtnAdd" PopupControlID="panel_Popup" Enabled="false" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender5" runat="server" BackgroundCssClass="Inactive"
        TargetControlID="hd1" CancelControlID="btnCategoryCanc" PopupControlID="panelEditCategory" Enabled="false">
    </cc1:ModalPopupExtender>
    <asp:HiddenField ID="hd1" runat="server" />
    <asp:Panel ID="panelEditCategory" runat="server" Style="display: none;" CssClass="ModalPopup"
        Width="500px" Height="256px" meta:resourcekey="panelEditCategoryResource1">
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="modal_header_left bottom_black">
                    &nbsp;
                </td>
                <td class="modal_header_bg" valign="top">
                    <div class="modal_header">
                        <asp:Literal ID="Literal7" runat="server" Text="Edit Category" meta:resourcekey="Literal7Resource1"></asp:Literal></div>
                </td>
            </tr>
            <tr>
                <td class="modal_rtgrey">
                    &nbsp;
                </td>
                <td class="modal_bg">
                    <div style="overflow: auto; overflow-x: hidden; width: 390px; height: 150px;">
                        <table align="left" cellpadding="4" cellspacing="0">
                            <tr>
                                <td align="left">
                                    <asp:Literal ID="Literal8" runat="server" Text="Category Name" meta:resourcekey="Literal8Resource1"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCatEdit" runat="server" meta:resourcekey="txtCatEditResource1"></asp:TextBox>
                                </td>
                                <td align="left">
                                    <asp:Literal ID="Literal9" runat="server" Text="Sort Order" meta:resourcekey="Literal9Resource1"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtShortOrder" runat="server" meta:resourcekey="txtShortOrderResource1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="separator_hor">
                    </div>
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td align="right">
                                <asp:Button ID="btnCategoryEdit" runat="server" CssClass="modalbtn_active" OnClick="btnCategoryEdit_Click"
                                    Text="Update" CausesValidation="False" meta:resourcekey="btnCategoryEditResource1" />
                                <asp:Button ID="btnCategoryCanc" runat="server" Text="Cancel" CssClass="modalbtn_active"
                                    CausesValidation="False" meta:resourcekey="btnCategoryCancResource1" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:HiddenField ID="hdnmsg" runat="server" />
    <asp:HiddenField ID="hdnCategoryId" runat="server" />
    <asp:Panel ID="panelEditstatus" runat="server" Style="display: none;" CssClass="ModalPopup"
        Width="500px" Height="256px" meta:resourcekey="panelEditstatusResource1">
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="modal_header_left bottom_black">
                    &nbsp;
                </td>
                <td class="modal_header_bg" valign="top">
                    <div class="modal_header">
                        <asp:Literal ID="ML_0035" runat="server" meta:resourcekey="ML_0035" Text="Edit Fields"></asp:Literal></div>
                </td>
            </tr>
            <tr>
                <td class="modal_rtgrey">
                    &nbsp;
                </td>
                <td class="modal_bg">
                    <div style="overflow: auto; overflow-x: hidden; width: 390px; height: 150px;">
                        <table align="left" cellpadding="4" cellspacing="0">
                            <tr>
                                <td align="left">
                                    <asp:Literal ID="ML_0036" runat="server" meta:resourcekey="ML_0036" Text="Field Name"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td align="left">
                                    <asp:TextBox CssClass="text_mid_bold" ID="txtFieldNameEdit" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Literal ID="ML_0039" runat="server" Text="Required"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td align="left">
                                    <asp:RadioButtonList ID="rdntRequired" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="M">Yes</asp:ListItem>
                                        <asp:ListItem Value="N">No</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                           <%--<tr>
                                <td align="left">
                                    <asp:Literal ID="ML_0039" runat="server" meta:resourcekey="ML_0039" Text="Field Status"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td align="left">
                                    <asp:RadioButtonList ID="rdnOnOff" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="rdnOnOff_SelectedIndexChanged"
                                        AutoPostBack="True" meta:resourcekey="rdnOnOffResource1">
                                        <asp:ListItem Value="A" meta:resourcekey="ListItemResource2">On</asp:ListItem>
                                        <asp:ListItem Value="I" meta:resourcekey="ListItemResource3">Off</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>--%>
                            <%--<tr>
                                <td>
                                    <asp:Literal ID="ML_0042" runat="server" meta:resourcekey="ML_0042" Text="Display Form"></asp:Literal>
                                </td>
                                <td class="colon">
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chkDataEntry" runat="server" Text="Use In Data Entry" meta:resourcekey="chkDataEntryResource1" />
                                    <asp:CheckBox ID="chkDatadisplay" runat="server" Text="Use In Data Display" meta:resourcekey="chkDatadisplayResource1" />
                                </td>
                            </tr>--%>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="separator_hor">
                    </div>
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td align="right">
                                <asp:Button ID="btnUpdate" runat="server" CssClass="modalbtn_active" Text="Update"
                                    CausesValidation="False" OnClick="btnUpdate_Click" meta:resourcekey="btnUpdate" />
                                <asp:Button ID="btnCancelEdit" runat="server" Text="Cancel" CssClass="modalbtn_active"
                                    OnClick="btnCancelEdit_Click" meta:resourcekey="btnCancelEdit" CausesValidation="False" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" BackgroundCssClass="Inactive"
        TargetControlID="hdn" PopupControlID="panelEditstatus" Enabled="false" />
    <asp:HiddenField ID="hdn" runat="server" />
    <asp:Panel ID="panelmsg" runat="server" Style="display: none;" CssClass="ModalPopup"
        Width="250px" Height="130px" meta:resourcekey="panelmsgResource1">
        <div class="modal_bg" style="height: 110px;">
            <table align="left" cellpadding="4" cellspacing="0" width="100%">
                <tr>
                    <td>
                        <asp:Label ID="lblmsgmandatory" runat="server" Text="You cannot turn off this field since it is a mandatory field..."
                            meta:resourcekey="lblmsgmandatoryResource1"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <div class="clear_m">
                        </div>
                        <div class="separator_hor">
                        </div>
                        <asp:Button ID="btnok" runat="server" CssClass="modalbtn_active" Text="Ok" OnClick="btnok_Click"
                            CausesValidation="False" OnClientClick="hidePopup('ctl00_ContentPlaceHolder1_ModalPopupExtender3')"
                            meta:resourcekey="btnokResource1" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <cc1:ModalPopupExtender ID="ModalPopupExtender3" runat="server" BackgroundCssClass="Inactive"
        TargetControlID="hdnmsg" PopupControlID="panelmsg" Enabled="true" />

    <asp:HiddenField ID="hdnMandatory" runat="server" />
    <asp:HiddenField ID="hdnAddressfield" runat="server" />
    <asp:HiddenField ID="hdnDefaultCustom" runat="server" />
    <asp:HiddenField ID="hdnFldid" runat="server" />
    <asp:HiddenField ID="hdnFieldview" runat="server" />
    <asp:HiddenField ID="hdnNode" runat="server" />
</asp:Content>
